package com.java;

import java.util.Scanner;

public class Test8 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int ret = scanner.nextInt();
        int count =0;
        for(int i = 0; i < 32; i++) {
            if(((ret >> i) & 1) == 1) {
                count++;
            }
        }
        System.out.println(count);
    }
}
